<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .p {
      position: absolute;
      background-color: skyblue;
      width: 300px;
      height: 300px;
      margin-top: 10px;
    }

    .s {
      position: absolute;
      background-color: tomato;
      top: 10px;
      width: 100px;
      height: 100px;
    }
  </style>
</head>

<body>
  <div class="p">
    <div class="s"></div>
  </div>
</body>

</html>